<template>
	<div class="panel panel-default">
          <div class="panel-heading">注册面板</div>
          <div class="panel-body">
            <ul class="list-group">
              <li class="list-group-item" v-for="user in users">
                <span class="badge" @click="registerUser(user)">注册</span>
               {{user.name}}
              </li>
             
            </ul>
            </div>
        </div>
</template>
<script>
	
	export default{
		computed:{
			users(){
				return this.$store.getters.uregisteredUsers;
			}

		},
		methods:{
			registerUser(user){				
				this.$store.dispatch('register',user.id);
			},

		}
	}
</script>